#!/usr/bin/ruby
# -*- ruby -*-

require 'rubygems'
require 'hoe'

task :default => [:compile]
task :compile => ["ext/alglib_ext.so"]

file "ext/Makefile" => "ext/extconf.rb" do |t|
    system %(cd ext && ruby extconf.rb)
end

file "ext/alglib_ext.so" => Dir.glob("ext/*.i")+["ext/Makefile", "ext/alglib/alglib_util.cpp", "ext/alglib/alglib_util.h"] do |t|
    system %(cd ext && rake)
    
end

Hoe.spec 'alglib' do |p|
  self.rubyforge_name = 'ruby-statsample' # if different than 'alglib'
  p.developer('Claudio Bustos', 'clbustos@gmail.com')
  p.spec_extras= {'extensions' => ['ext/extconf.rb']}
  p.url = "http://rubyforge.org/projects/ruby-statsample/"
end

# vim: syntax=ruby
